import requests
head = {"User-Agent": "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.159 Safari/537.36"}
r = requests.get('http://www.douban.com',headers=head)
r.encoding = r.apparent_encoding
print(r.status_code)
print(r.url)
print(r.headers)
print(r.history)
print(r.text)